LanguageExt.Core

LanguageExt.Core DataTypes Range

Contents

record Range <A> (A From, A To, A Step, IEnumerable<A> runRange) Source #

Represents a range of values

Parameters

type A

Bound values type

Properties

property object? Case Source #

Reference version for use in pattern-matching

Methods

method Seq<A> ToSeq () Source #

method EnumerableM<A> AsEnumerable () Source #

method IEnumerator<A> GetEnumerator () Source #

class RangeExtensions Source #

Methods

method Range<A> As <A> (this K<Range, A> ma) Source #

Convert kind to concrete type

method bool InRange <A> (this K<Range, A> ma, A value) Source #

where A : IComparisonOperators<A, A, bool>

Returns true if the value provided is in range

Parameters

param value

Value to test

returns

True if the value provided is in range

method bool Overlaps <A> (this K<Range, A> ma, Range<A> other) Source #

where A : IComparisonOperators<A, A, bool>

Returns true if the range provided overlaps this range

Parameters

param other

The range to test

returns

True if the range provided overlaps this range

class Range Source #

Methods

method Range<A> zero <A> () Source #

where A : IAdditiveIdentity<A, A>

Zero range

method Range<A> fromMinMax <A> (A min, A max) Source #

where A : INumberBase<A>, ISubtractionOperators<A, A, A>, IComparisonOperators<A, A, bool>, IAdditionOperators<A, A, A>, IEqualityOperators<A, A, bool>

Construct a new range

Parameters

param from

The minimum value in the range

param to

The maximum value in the range

method Range<A> fromMinMax <A> (A min, A max, A step) Source #

where A : IAdditionOperators<A, A, A>, IComparisonOperators<A, A, bool>

Construct a new range

Parameters

param from

The minimum value in the range

param to

The maximum value in the range

param step

The size of each step in the range

method Range<A> fromCount <A> (A min, A count) Source #

where A : IComparisonOperators<A, A, bool>, INumberBase<A>

Construct a new range

Parameters

param from

The minimum value in the range

param count

The number of items in the range

method Range<A> fromCount <A> (A min, A count, A step) Source #

where A : INumberBase<A>, IComparisonOperators<A, A, bool>

Construct a new range

Parameters

param from

The minimum value in the range

param count

The number of items in the range

param step

The size of each step in the range

class Range Source #